<!doctype html>
<html lang="{{ HTML_LANG }}">
<head>
	<meta charset="utf-8"/>
	<title>{% block title %}{{ SITENAME }}{%endblock%}</title>
	<meta name="author" content="{{ AUTHOR }}">

	{% block extra_meta %}
	{% endblock %}

	<link rel="top" href="#" /><link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,300italic,400italic,600italic|Source+Code+Pro' rel='stylesheet' type='text/css'></link>
	<link rel="stylesheet" href="{{ SITEURL }}/theme/css/{{ CSS_FILE }}" type="text/css" />

	{% block scripts %}
	{% endblock %}

    {% if FEED_ALL_ATOM %}
    <link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Atom Feed" />
    {% endif %}
    {% if FEED_ALL_RSS %}
    <link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} RSS Feed" />
    {% endif %}
</head>

<body>
{{ FEED_ATOM }}
    <div class="container">

	  <header role="banner">
	    <div class="feeds">
	      {% if FEED_ALL_ATOM %}
	        <a href="{{ SITEURL }}/{{ FEED_ALL_ATOM }}" rel="alternate"><img src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/feed-32px.png" alt="atom feed"/></a>
	      {% endif %}
          {% if FEED_ALL_RSS %}
            <a href="{{ SITEURL }}/{{ FEED_ALL_RSS }}" rel="alternate"><img src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/feed-32px.png" alt="rss feed"/></a>
          {% endif %}
	    </div>
	    {% if PAGES %}
	      <nav class="pages">
	        {% for p in PAGES %}
			  <a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a>
			  {% if not loop.last %}-{% endif %}
			{% endfor %}
	      </nav>
	    {% endif %}
		<a href="{{ SITEURL }}" class="title">{{ SITENAME }}</a>
      </header>

	  <div class="wrapper">

		  <div role="main" class="content">
		    {% block content %}{% endblock %}
		  </div>

		  <div class="sidebar">

	        <nav>
	          <h2>Categories</h2>
	          <ul>
	            {% for cat, null in categories %}
	              <li {% if cat == category %}class="active"{% endif %}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li>
	            {% endfor %}
	          </ul>
	        </nav>

	        {% if SOCIAL %}
	          <aside>
	          <h2>Social</h2>
			    <ul class="social">
				  {% for name, link in SOCIAL %}
				  <li><a href="{{ link }}">{{ name }}</a><i></i></li>
				  {% endfor %}
			    </ul>
			  </aside>
			{% endif %}

	        {% if LINKS %}
	          <aside>
	            <h2>Blogroll</h2>
	            <ul>
	              {% for name, link in LINKS %}
	                <li><a href="{{ link }}">{{ name }}</a></li>
	              {% endfor %}
	            </ul>
	          </aside>
	        {% endif %}

		  </div>

	  </div>

      <footer>
		<p role="contentinfo">
		  © 2013 {{ AUTHOR }} - Proudly powered by <a href="http://alexis.notmyidea.org/pelican/">pelican</a>. Theme <a href="https://github.com/fle/pelican-simplegrey">pelican-simplegrey</a>.
    	</p>

	  </footer>

	</div>

	{% if GOOGLE_ANALYTICS %}
	  <script>
		var _gaq=[['_setAccount','{{ GOOGLE_ANALYTICS }}'],['_trackPageview']];
		(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
		g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
		s.parentNode.insertBefore(g,s)}(document,'script'));
	  </script>
    {% endif %}

</body>
</html>
